<!-- 
   图文结构封装组件
  -->
<template>
  <div>
    <el-table :data="tableData" style="width: 100%" size="mini" border>
      <el-table-column type="index" width="50" label="序号" align="center">
      </el-table-column>
      <el-table-column label="信息" prop="sendMessage" align="center">
        <template slot-scope="scope">
          <div>
            {{ scope.row.sendMessage }}
          </div>
        </template>
      </el-table-column>
      <el-table-column
        label="微信昵称"
        prop="wxName"
        align="center"
        width="180px;"
      >
        <template slot-scope="scope">
          <div>
            {{ scope.row.wxName }}
          </div>
        </template>
      </el-table-column>
      <el-table-column
        label="发送消息"
        prop="sendTime"
        align="center"
        width="230px;"
      >
        <template slot-scope="scope">
          <div>
            {{ scope.row.sendTime }}
          </div>
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>
<script>
export default {
  name: "filesList",
  props: ["tableData"],
  data() {
    return {
      url: process.env.VUE_APP_URL + "/sys/oss/upload",
      // url: "https://jsonplaceholder.typicode.com/posts/"
      hideUpload: false,
      imgIndex: 0
    };
  },
  components: {},
  mounted() {},
  methods: {
    del(value) {
      this.$confirm("此操作将删除此文件?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning"
      }).then(() => {
        this.tableData.splice(value, 1);
        this.$emit("handleTableDate", this.tableData);
      });
    },
    addLine() {
      //添加行数
      var newValue = {
        legalDatetime: "",
        legalInfo: "",
        legalDesc: ""
      };
      //添加新的行数
      this.tableData.push(newValue);
      this.$emit("handleTableDate", this.tableData);
    }
  }
};
</script>
<style scoped lang="scss">
.sort {
  cursor: pointer;
  color: #409eff;
}
.sort:hover {
  color: #027cfb;
}
.add-text {
  text-align: center;
  span {
    cursor: pointer;
    color: #027cfb;
  }
}
</style>
